import request from "@/utils/request";

let phoneApi = {
  // 获取手机列表
  getList(query) {
    return request({
      url: "/telManage/list",
      method: "get",
      params: query,
    });
  },
  getListNew(query) {
    return request({
      url: "/telManage/listV1",
      method: "get",
      params: query,
    });
  },
  // 获取所有手机列表
  getAllList(query) {
    return request({
      url: "/account/tel/manage/allList",
      method: "get",
      params: query,
    });
  },
  //新增
  addPhone(data) {
    return request({
      url: "/telManage",
      method: "post",
      data: data,
    });
  },
  //编辑
  editPhone(data) {
    return request({
      url: "/telManage",
      method: "put",
      data,
    });
  },
  //转已空闲
  editListPhone(data) {
    return request({
      url: "/account/tel/manage/editTel",
      method: "put",
      data,
    });
  },
  //删除
  delPhone(id) {
    return request({
      url: `/telManage/${id}`,
      method: "delete",
    });
  },
  //导出
  daochuPhone(data) {
    return request({
      url: `/telManage/export`,
      method: "get",
      params: data,
    });
  },
  userStatus(data) {
    return request({
      url: "/telManage/userStatus",
      method: "post",
      data: data,
    });
  },
  toUse(query) {
    return request({
      url: "telManage/use/" + query,
      method: "get",
    });
  },
  //导入
  daoru() {
    return request({
      url: "/telManage/importData",
      method: "post",
    });
  },
  //导出模板
  daochu() {
    return request({
      url: "/telManage/getImportExcel ",
      method: "get",
    });
  },
  //发送短信
  fssongPhoneMessage(data) {
    return request({
      url: "/telManage/sendSMS",
      method: "put",
      data,
    });
  },
  //短信日志啊
  messageDetailinfo(params) {
    return request({
      url: "/tel/msg/list",
      method: "get",
      params,
    });
  },
  //获取游戏类型
  getGameTypeList() {
    return request({
      url: "/gameCarrier/list",
      method: "get",
    });
  },
  //根据游戏类型获取
  getGamePhoneInfo(id) {
    return request({
      url: `/gameCarrierNumber/list?gameCarrierId=${id}`,
      method: "get",
    });
  },
};
export default phoneApi;
